import { View, Text, Button } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import { useState, } from "react";
import "./index.scss";

export default function Index() {
  const [count, setCount] = useState(0);
  useLoad(() => {
    console.log("Page loaded.");
  });


  return (
    <View className='index'>
      <Button type='default' size='mini' loading onClick={() => setCount(count + 1)}>+</Button>
      <Text>{count}</Text>
      <Button onClick={() => setCount(count - 1)}>-</Button>
    </View>
  );
}
